package com.lgh.hotel.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.lgh.hotel.utils.HttpRequest;
import com.lgh.hotel.vo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/yiqing")
public class YingQingController {


    @GetMapping
    public Result yiqing(){

        //https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=statisGradeCityDetail,diseaseh5Shelf
//        String s = HttpRequest.sendGet("https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5", null);
        String s = HttpRequest.sendGet("https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=statisGradeCityDetail,diseaseh5Shelf", null);
        JSONObject jsonObject = JSONObject.parseObject(s);
        Object o = jsonObject.get("data");

        return Result.succ(o);
    }


}
